package com.heima.homeservicemanagementsystem.mapper;

import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import com.heima.homeservicemanagementsystem.entity.ServiceServicedetail;
import org.apache.ibatis.annotations.Select;

/**
 * 服务和服务详情(ServiceServicedetail)表数据库访问层
 *
 * @author makejava
 * @since 2025-04-15 10:01:16
 */
@Mapper
public interface ServiceServicedetailMapper extends BaseMapper<ServiceServicedetail> {
    @Select("SELECT serviceid, COUNT(*) AS serviceid_count FROM service_servicedetail GROUP BY serviceid ORDER BY serviceid_count DESC")
    List<Map<String, Object>> selectServiceidCount(LambdaQueryWrapper<ServiceServicedetail> queryWrapper);

}

